package com.example.backend.controller.exception;

import com.example.backend.domain.entity.RestBean;
import jakarta.validation.ValidationException;
import org.springframework.web.bind.annotation.ExceptionHandler;
import org.springframework.web.bind.annotation.RestControllerAdvice;

@RestControllerAdvice
public class ValidationController {
    @ExceptionHandler(ValidationException.class)
    public RestBean<Void> validateException(ValidationException exception){
        return RestBean.failure(400,"请求参数有误");
    }
}
